package handler

import (
	"github.com/gin-gonic/gin"
	"nearby/biz/common"
	"nearby/biz/model"
	"nearby/biz/service"
)

// DeleteComment  [Delete] /nearby/comment/:comment_id
func DeleteComment(c *gin.Context) {
	req := &model.DeleteCommentRequest{}
	if err := c.ShouldBindUri(req); err != nil {
		c.JSON(400, err.Error())
		return
	}
	var ss service.DeleteCommentService
	resp, err := ss.Execute(c, req)
	if err != nil {
		common.WriteError(c, err)
		return
	}
	c.JSON(200, resp)
}
